var e = getApp();

Component({
    properties: {
        item: {
            value: {},
            type: Object
        },
        labelShow: {
            value: !1,
            type: Boolean
        },
        clickShow: {
            value: !1,
            type: Boolean
        },
        index: {
            value: 0,
            type: Number
        }
    },
    data: {
        typeArr: [ "", "图文", "文章", "音频", "视频" ]
    },
    methods: {
        gotoDetails: function() {
            var a = this.data.item;
            if (1 != a.is_open) return e.tips("广告已下架");
            if (2 == a.type || 4 == a.genre) {
                var i = this.data.index;
                i = Math.ceil((i + 1) / 15), wx.navigateTo({
                    url: "/packageI/newMedia/newMediaAdVideo/newMediaAdVideo?vid=" + a.id + "&page=" + i + "&advertisingt_type=" + a.type
                });
            } else wx.navigateTo({
                url: "/packageI/newMedia/newMediaAdDetails/newMediaAdDetails?id=" + a.id
            });
        }
    }
});